package pers.cz.freemarker;

/**
 * @program: PostGirl-panent
 * @description: Field
 * @author: Cheng Zhi
 * @create: 2022-04-09 15:52
 **/
public class Field {

    private String param;
    private String paramType;
    private String paramDes;

    public Field(String param, String paramType, String paramDes) {
        // 将大于号和小于号替换为 &lt; &gt; &amp; &apos;&quot;
        this.param = param.replace("<","&lt;").replace(">","&gt;").replace("&","&amp;");
        this.paramType = paramType.replace("<","&lt;").replace(">","&gt;").replace("&","&amp;");
        this.paramDes = paramDes.replace("<","&lt;").replace(">","&gt;").replace("&","&amp;");
    }

    public String getParam() {
        return param;
    }

    public void setParam(String param) {
        this.param = param;
    }

    public String getParamType() {
        return paramType;
    }

    public void setParamType(String paramType) {
        this.paramType = paramType;
    }

    public String getParamDes() {
        return paramDes;
    }

    public void setParamDes(String paramDes) {
        this.paramDes = paramDes;
    }

    @Override
    public int hashCode() {
        return this.param.hashCode();
    }

    @Override
    public boolean equals(Object obj) {

        Field object = (Field) obj;
        return this.param.equals(object.param);
    }
}
